<!--------------收货地址修改-------------->
<center>
管理地址:

添加您的收货地址:
<form action='edit.php?a=update' method='POST'>
<td>
	<input type="hidden" name="hidden">
	修改地址:<input type="text" name="address" value="<?php echo $stu['address']; ?>" class="text-word"><br/><br/>
	修改密码:<input type="text" name="pass" value="<?php echo $stu['pass']; ?>" class="text-word"><br/><br/>
</td>
	<input name="" type="submit" value="提交" class="text-but">
    <input name="" type="reset" value="重置" class="text-but">
</form>	
<?php
	include("./dbconfig.php");
	$link = @mysqli_connect(HOST,USER,PASS) or die("数据库连接失败");
	mysqli_select_db($link,DBNAME);
	mysqli_set_charset($link,"utf8");
	
	switch($_GET['a']){
	 case 'update': //修改
            $address = $_POST['address'];
           
            $sql = "update users set address='$address' where id={$_POST['id']}";
            
            $result = mysqli_query($link,$sql);
            
           
                header("Location:../ucenter.php");
            
        break;
	}
?>
</center>	